﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="WSCC_wk_3._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="#336666" 
            BorderStyle="Double" BorderWidth="3px" CellPadding="4" DataKeyNames="ID" 
            DataSourceID="SqlDataSource1" GridLines="Horizontal">
            <Columns>
                <asp:BoundField DataField="modelYear" HeaderText="modelYear" 
                    SortExpression="modelYear" />
                <asp:BoundField DataField="CC" HeaderText="CC" SortExpression="CC" />
                <asp:BoundField DataField="make" HeaderText="make" SortExpression="make" />
                <asp:BoundField DataField="condition" HeaderText="condition" 
                    SortExpression="condition" />
                <asp:BoundField DataField="colour" HeaderText="colour" 
                    SortExpression="colour" />
                <asp:BoundField DataField="registration" HeaderText="registration" 
                    SortExpression="registration" />
                <asp:BoundField DataField="price" HeaderText="price" SortExpression="price" />
                <asp:BoundField DataField="contactNumber" HeaderText="contactNumber" 
                    SortExpression="contactNumber" />
                <asp:ImageField DataImageUrlField="picture" HeaderText="Photo">
                    <ControlStyle Height="100px" Width="100px" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="infoUrl" 
                    DataNavigateUrlFormatString="{0}" DataTextField="modelName" HeaderText="Info" />
                <asp:HyperLinkField DataNavigateUrlFields="sellerPostcode" 
                    DataNavigateUrlFormatString="http://maps.google.co.uk/?q={0}" 
                    DataTextField="sellerPostcode" HeaderText="Location" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Detail.aspx?ID={0}" HeaderText="Detail" 
                    Text="Detail" />
            </Columns>
            <FooterStyle BackColor="White" ForeColor="#333333" />
            <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="White" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F7F7F7" />
            <SortedAscendingHeaderStyle BackColor="#487575" />
            <SortedDescendingCellStyle BackColor="#E5E5E5" />
            <SortedDescendingHeaderStyle BackColor="#275353" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:CarsConn %>" 
            ProviderName="<%$ ConnectionStrings:CarsConn.ProviderName %>" 
            SelectCommand="SELECT * FROM [ClassicCars]"></asp:SqlDataSource>
        <br />
        <br />
        <br />
    </p>
</asp:Content>
